package cn.jmz.micpro.entity.db.user;

import lombok.Getter;
import lombok.Setter;
import org.hibernate.annotations.GenericGenerator;
import org.springframework.boot.autoconfigure.data.jpa.JpaRepositoriesAutoConfiguration;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;

/**
 * cn.jmz.micpro.jpa.model
 *
 * @author JMZ
 * @date 2021/12/16 13:11
 */
@Entity
@Getter
@Setter
@Table(name = "app_user")
public class User extends JpaRepositoriesAutoConfiguration {

    @Id
    @Column(name = "user_id")
    @GeneratedValue(strategy = GenerationType.AUTO, generator = "MyIdentityGenerator")
    @GenericGenerator(name = "MyIdentityGenerator", strategy = "cn.jmz.micpro.common.utils.SnowflakeIdUtil")
    private long userId;
    @Column(name = "user_name")
    private String userName;
    @Column(name = "user_password")
    private String userPassword;
    @Column(name = "user_mobile")
    private String userMobile;

}
